package com.example.my_flea_street.Mapper;


import com.example.my_flea_street.bean.Banner;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface HomeMapper {

    @Select("select * from banner")
    List<Banner> getBanner();

    @Select("select distinct head from user a,information b where a.id=b.user_id and b.category=#{category} ORDER BY b.release_time desc LIMIT 5")
    List<String> getHeads(@Param("category") int category);
}
